const express = require('express');
const router = express.Router();

// 导入各模块路由
const designRoutes = require('./design');
const mediaRoutes = require('./media');
const exerciseRoutes = require('./exercise');
const paperRoutes = require('./paper');
const customRoutes = require('./custom');
const feedbackRoutes = require('./feedback');
const resourceRoutes = require('./resource');
const homeRoutes = require('./home');
const pptRoutes = require('./ppt');

// 注册路由
router.use('/design', designRoutes);
router.use('/media', mediaRoutes);
router.use('/exercise', exerciseRoutes);
router.use('/paper', paperRoutes);
router.use('/custom', customRoutes);
router.use('/feedback', feedbackRoutes);
router.use('/resource', resourceRoutes);
router.use('/home', homeRoutes);
router.use('/ppt', pptRoutes);

// API状态检查路由
router.get('/status', (req, res) => {
  res.json({
    code: 200,
    success: true,
    message: 'API服务正常运行',
    timestamp: new Date().toISOString(),
    version: '1.0.0'
  });
});

module.exports = router;